Render fieldcompare diff visualizations - #883
Conversation
MakisH
left a comment
There was a problem hiding this comment.
Thank you for the PR! Some first comments, I will continue once I can run it.
| @@ -1 +1 @@ | |||
| - Archive fieldcompare diff VTK files into a `diff-results/` folder in each systemtest run directory on failure so they are easy to find in CI artifacts when investigating comparison failures (fixes [#441](https://github.com/precice/tutorials/issues/441)). Nested paths under `precice-exports/` are preserved under `diff-results/`. | |||
| - Archive fieldcompare diff VTK files into a `diff-results/` folder in each systemtest run directory on failure so they are easy to find in CI artifacts when investigating comparison failures (fixes [#441](https://github.com/precice/tutorials/issues/441)). Nested paths under `precice-exports/` are preserved under `diff-results/`, and each numeric point field is rendered headlessly as a sphere-glyph PNG in `diff-results/visualizations/`. | |||
There was a problem hiding this comment.
Links to both PRs should be mentioned here. It looks like this previously slipped.
There was a problem hiding this comment.
It looks like we need more dependencies. Running on GHA, I get:
2026-07-18 08:56:07.732 ( 2.224s) [ 7FE8965761C0]vtkOpenGLRenderWindow.c:645 WARN| Failed to load EGL! Please install the EGL library from your distribution's package manager.
2026-07-18 08:56:07.732 ( 2.225s) [ 7FE8965761C0]vtkOSOpenGLRenderWindow:149 WARN| libOSMesa not found. It appears that OSMesa is not installed in your system. Please install the OSMesa library from your distribution's package manager.
2026-07-18 08:56:07.734 ( 2.226s) [ 7FE8965761C0]vtkOpenGLRenderWindow.c:645 WARN| Failed to load EGL! Please install the EGL library from your distribution's package manager.
2026-07-18 08:56:07.734 ( 2.226s) [ 7FE8965761C0]vtkOSOpenGLRenderWindow:149 WARN| libOSMesa not found. It appears that OSMesa is not installed in your system. Please install the OSMesa library from your distribution's package manager.
CRITICAL: Fieldcompare returned non zero exit code, therefore Channel transport (fluid-openfoam, transport-openfoam) failed
There was a problem hiding this comment.
Thanks for sharing the logs here, now I have moved the rendering path to Docker and added OSMesa there (libosmesa6 + diff_visualizer stage), so local and GHA now use the same headless setup.
There was a problem hiding this comment.
The respective images could also be added to the _logs build artifact in the GHA workflow.
Even better would be if we could add them on the job summary. I guess that images on job summaries are supported, but I am not sure where to source the image from.
There was a problem hiding this comment.
Thanks now I have added the PNG visualizations to the _logs artifact and also added a small job-summary link so they’re easier to find.
Run diff PNG rendering through a dedicated Docker stage with libosmesa6 so local and CI follow the same headless path, and include generated PNGs in the _logs artifact with a job-summary link.
Summary
Render archived fieldcompare diff VTK files as PNG images when result comparison fails.
Generate one image per numeric point field using distinct sphere glyphs and a generic automatically selected view.
Store images under
diff-results/visualizations/in the system-test artifacts.Keep visualization best-effort so rendering errors do not hide the original fieldcompare failure.
Fixes #441.
Test plan
Generated PNGs from synthetic scalar and vector VTK fields.
Verified the
archive-to-visualizationfailure path locally.Rendered five real
CI diff VTK files, producing 13 PNGs.Checked zero and non-zero differences visually.
Ran
pre-commitchecks successfully.